﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BoatNGoat
{
    public class SpriteAnimationFrame
    {
        /// <summary>
        /// The row this sprite is in within the SpriteSheet. 0 is the top row.
        /// </summary>
        public int Row { get; set; }

        /// <summary>
        /// The column this sprite is in within the SpriteSheet. 0 is the left column.
        /// </summary>
        public int Column { get; set; }

        public SpriteAnimationFrame(int row, int column)
        {
            Row = row;
            Column = column;
        }
    }

    public class SpriteAnimation
    {
        public List<SpriteAnimationFrame> AnimationFrames { get; set; }
        public int CurrentFrame { get; set; }

        public SpriteAnimation()
        {
            AnimationFrames = new List<SpriteAnimationFrame>();
        }

        public SpriteAnimation(List<SpriteAnimationFrame> animationFrames)
        {
            AnimationFrames = animationFrames;
        }

        public void AddFrame(SpriteAnimationFrame frame)
        {
            AnimationFrames.Add(frame);
        }

        public void AddFrame(int row, int column)
        {
            AddFrame(new SpriteAnimationFrame(row, column));
        }
    }
}
